Skip to main content

Command: Creating Macro Modules

Symbol: ac_icon_macro_module.png

This command (in the "Composer" category) opens a dialog for generating macro modules.

To use this command, you need a valid license for creating module declarations.

The command is available if you have selected a subtree in the module tree. You can use this command to generate a macro module from the modules of the subtree. In this way you can define which slots, I/Os, and parameters of the submodule are available in the new macro module.

ac_img_create_macro_module.png
Table 6. Meta Data

Name

This is the unique name for the macro module.

Macro Description

The description is created as text lists.

Macro Category

The category is used to subdivide the modules in the insertion dialog box for modules.



Table 7. Slots / IOs / Parameters

Macro Module Subtree

Tree view of all objects of the subtree

The structure also shows all slots, I/Os, and parameters of the respective submodule instance as child elements (bold font).

Macro Module Slots

This displays all slots, I/Os, and parameters that the macro module type should include.

These elements come straight from the tree view on the left.

Macro Module IOs

Macro-Module Parameters

Add to macro

This is active if you select a slot, I/O, or parameter in the tree view on the left.

You add the elements to the macro module by clicking this button.

Remove from macro

This is active if you select slots, I/Os, or parameters from the tree view on the right.

You remove the elements from the macro module by clicking this button.



When you close the dialog by clicking OK, CODESYS Application Composer generates a module declaration, a text list, and an image pool for this macro module. The objects are stored in a folder with the macro name. You can now edit the generated objects with no restrictions and independent of generation. In this way, for example, you can exchange the macro icon in the image pool.